<div id="modal-form<%= index %>" class="modal fade" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h3 class="modal-title"><span class="text-primary"><%= group %></span><small>显示数据设置</small></h3>
      </div>
      <div class="modal-body">
        <div class="row">
          <div class="col-sm-12">
            <%= form_tag admin_pattern_path(pattern), method: :patch do %>
              <table class="table table-bordered text-center">
                <thead>
                  <tr>
                    <th class="text-center" width="50%">数据</th>
                    <th class="text-center">是否显示</th>
                  </tr>
                </thead>
                <tbody>
                  <% points.each do |point| %>
                    <tr>
                      <td><%= point %></td>
                      <td>
                        <%= hidden_field_tag "points[#{group}][#{point}]", 0 %>
                        <%= check_box_tag "points[#{group}][#{point}]", 1 , point_show?(exclude_points, group, point), class: 'js-switch' %>
                      </td>
                    </tr>
                  <% end %>
                </tbody>
              </table>
              <div class="text-center">
                <button class="btn btn-primary" type="submit"><strong>确认</strong></button>
              </div>
            <% end %>
          </div>
        </div>
      </div>
    </div>
  </div> 
</div>